/* === Base et import =================================================== */
/* Playfair Display */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;800&display=swap');
/* Italiana */
@import url('https://fonts.googleapis.com/css2?family=Italiana&display=swap');

* {
  box-sizing: border-box;
  margin: 0px;
  padding: 0px;
}


/* === Variables =================================================== */

:root {
  /* Font Size ------ */
  --fs-title: 32px;
  --fs-focus: 20px;
  --fs-text: 16px;
  --fs-feedback: 14px;

  /* Couleurs ------ */
  --c-background: rgba(251, 244, 233, 0.97);
  --c-bg-gradient: linear-gradient(
    -30deg,
    rgba(255, 252, 245, 0.99),
    rgba(251, 244, 233, 0.97)
  );
  --c-text: #662CAE;
  --c-selected: #bf68a8;
  --c-selected-text: #2b1626;
  --c-selected-soft: rgba(191, 104, 168, 0.2);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.6);

  /* Espacements ------ */
  --radius: 18px;
  --space-1: 4px; /* petit */
  --space-2: 8px; /* moyen */
  --space-3: 12px; /* grand */

}

/* === Typographie =================================================== */

h2{
  font-family: 'Playfair Display', serif;
  font-size: var(--fs-title);
  font-weight: 800;
}

h3 {
  font-family: 'Playfair Display', serif;
  font-size: var(--fs-focus);
  font-weight: 400;
  color: var(--c-text);
  margin-bottom: var(--space-1);
  margin-bottom: calc(var(--space-1)*-1);
}

p,
label,
button,
table,
thead th,
td,
select,
.day-num {
  font-family: 'Playfair Display', serif;
  font-size: var(--fs-text);
  font-weight: 400;
  color: var(--c-text);
}

.status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--c-background);
  font-family: 'Italiana', serif;
  pointer-events: none;
  text-align: center;
}

.statusSymbol,
.statusLabel {
  display: block;
  line-height: 1;
}

.statusSymbol {
  font-size: var(--fs-focus);
}

.statusLabel {
  font-size: var(--fs-text);
}


/* === Layout et communs =============================================== */

body {
  height: 100%;
  min-height: 100dvh;
  background: #000 url("img/background.jpg") center center / cover no-repeat;
  color: var(--c-text);
}

.d-flexVertical{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.boxDesign{
  background: var(--c-bg-gradient);
  border: 2px solid var(--c-text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 0;
  transform: translateY(-20px);
  animation: opacity 0.5s linear forwards;
}

.boxComplement{
  width: calc(100% - var(--radius) - var(--radius));
  justify-self: center;
  padding: var(--space-2);
}

.interactiveButton {
  width: 70%;
  justify-self: center;
  padding: var(--space-2);
  background: var(--c-text);
  color: var(--c-background);
  border: 2px solid var(--c-background);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
}


/* === Page d'accueil =============================================================== */
.cardIntroduction {
  width: min(620px, 92vw);
  padding: var(--space-3);
  gap: var(--space-3);
}

.selectionSpace {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.dateSelectionSpace{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
  
}

select {
  appearance: none;
  padding: 12px 14px;
  outline: none;
  min-width: 36vw;
  text-align: center;
  margin-top: var(--space-1);
}

.actions {
  margin-top: var(--space-2);
  display: flex;
  gap: var(--space-1);
}

/* === Page Calendrier =============================================================== */

.wrap {
  width: min(1100px, 95vw);
  min-height: 80vh;
  display: grid;
  gap: var(--space-2);
  grid-template-rows: auto auto 1fr auto auto; /* bouton + titre + calendrier + note + toolbar */
  padding: var(--space-3);
  flex: 0 0 auto;
}

.booking-note {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
}

.calendar-box {
  width: 100%;
  height: 100%;
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  position: relative;
}

table {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

#dowRow {
  height: var(--fs-text);
}

#dowRow th {
  color: var(--c-text);
  text-align: center;
  border-bottom: 1px solid var(--c-text);
  
}

/* Case du calendrier */
td {
  border: 1px solid var(--c-text);
  text-align: center;
  vertical-align: center;
  user-select: none;
  cursor: pointer;
  position: relative;
}

td.out-of-month {
  background: var(--c-selected-soft);
  color: var(--c-selected-text);
  cursor: not-allowed;
}

td.selected {
  background: var(--c-selected);
  color: var(--c-selected-text);
}

.day-num {
  position: absolute;
  top: var(--space-1);
  left: var(--space-2);
  color: var(--c-text);
  font-size: var(--fs-focus);
  pointer-events: none;
}


td.selected .day-num {
  color: var(--c-background);
  font-size: var(--fs-feedback);
}

.calendarSparkle {
  position: absolute;
  z-index: 10;
  pointer-events: none;
}

/* Étoiles */
.sparkleTop {
  top: -20px;
  right: -20px;
  font-size: 50px;
  text-shadow: 0px 0px 10px var(--c-selected) ;
}

.sparkleBottom {
  bottom: -15px;
  left: -15px;
  font-size: 30px;
  text-shadow: 0px 0px 10px var(--c-selected) ;
}


/* === Animations =============================================================== */
@keyframes opacity {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
