/* ═══════════════════════════════════════════════════════════
   TEMPUS MAGIS – style2.css
   Style original fidèle + rendu responsive mobile
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css?family=Roboto:400,700');
@import url('https://fonts.googleapis.com/css?family=Roboto+Slab:400,700');

/* ── Base ── */
html {
    margin: 0;
    padding: 0;
    background: #05091a url('../images/fondMars26.png') repeat center top fixed;
    background-size: contain;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

h1,
h2 {
    font-family: 'Roboto Slab', serif;
}

.stopFloat {
    float: none;
    clear: both;
}

/* ── Conteneur principal ── */
#conteneur {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-left: 1px solid rgba(100, 140, 220, 0.22);
    border-right: 1px solid rgba(100, 140, 220, 0.22);
    box-sizing: border-box;
}

/* ── Bannière ── */
#ban {
    width: 100%;
    height: 200px;
    background-image: url('../images/BaniereNew.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    position: relative;
    box-sizing: border-box;
}


/* ── Frise décorative ── */
#frise {
    width: 100%;
    height: 30px;
    background-image: url('../images/frise.png');
    background-repeat: repeat-x;
}

/* ── Corps ── */
#corps {
    background-color: rgba(8, 13, 26, 0.94);
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px 20px;
}

/* ═══════════════════════════════════════════════════════════
   BLOC NEWSLETTER
═══════════════════════════════════════════════════════════ */
#boxSaveAndSend {
    box-sizing: border-box;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    letter-spacing: 0.03em;
    margin: 0 auto;
    padding: 14px 13px 10px;
    text-align: center;
    width: 100%;
}

#boxSaveAndSend h2 {
    margin: 4px 0 8px;
    font-size: 1.25em;
    color: #c9a96e;
    letter-spacing: 0.03em;
}

#boxSaveAndSend p {
    margin: 6px 0;
    font-size: 0.97em;
    line-height: 1.60;
    color: #d8e8f8;
}

.nl-signature {
    text-align: right !important;
    font-size: 0.85em !important;
    color: rgba(168, 192, 224, 0.65) !important;
    margin: 4px 0 0 !important;
    font-style: italic;
}

#boxTexteSaveAndSend,
#boxAfterAction {
    margin-bottom: 8px;
}

/* Champs du formulaire */
#formRow {
    display: flex;
    flex-direction: row;
    /* toujours en ligne sur desktop */
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-end;
    /* labels + inputs alignés par le bas des inputs */
    gap: 14px;
    margin: 10px auto 8px;
    max-width: 500px;
    background: linear-gradient(135deg, rgba(8, 16, 38, 0.60) 0%, rgba(12, 25, 55, 0.55) 100%);
    border: 1px solid rgba(100, 140, 220, 0.18);
    border-top: 2px solid rgba(154, 122, 58, 0.45);
    border-radius: 8px;
    padding: 16px 20px;
}

#boxSaveAndSend .boxItemFormSaveAndSend {
    flex: 0 0 200px;
    /* largeur fixe – reste côte à côte */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
}

#boxSaveAndSend .boxItemFormSaveAndSend label {
    display: block;
    color: #c9a96e;
    font-size: 0.70em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-right: 0;
}

#boxSaveAndSend .boxItemFormSaveAndSend input[type="text"] {
    color: #1a1610;
    font-size: 15px;
    padding: 7px 12px;
    width: 100%;
    /* prend les 200px du parent */
    border: none;
    border-bottom: 2px solid #9a7a3a;
    border-radius: 4px 4px 2px 2px;
    background: #e8dfc8;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

#boxSaveAndSend .boxItemFormSaveAndSend input[type="text"]:focus {
    outline: none;
    border-bottom-color: #c9a96e;
    background: #f0e8d4;
}

#blocPetitSousFormNl {
    margin: 6px 0 0;
    font-size: 0.80em;
    color: #8aaccc;
}

#btnBoxSaveAndSend {
    background-image: linear-gradient(#b19663, #927451);
    border-radius: 8px;
    color: #fff;
    display: block;
    font-size: 1.05em;
    height: 34px;
    line-height: 14px;
    margin: 8px auto 0;
    text-align: center;
    text-decoration: none;
    width: 90%;
    max-width: 600px;
    transition: background 0.2s;
}

#btnBoxSaveAndSend:hover {
    background-image: linear-gradient(#927451, #b19663);
}

/* ═══════════════════════════════════════════════════════════
   SÉLECTION DATE & LIEU
═══════════════════════════════════════════════════════════ */
.intro-haut {
    margin: 10px auto 16px;
    padding: 12px 20px;
    max-width: 680px;
    font-size: 1.0em;
    font-weight: 600;
    line-height: 1.65;
    text-align: center;
    color: #c8daf0;
    background: linear-gradient(135deg, rgba(10, 20, 48, 0.70) 0%, rgba(8, 14, 34, 0.65) 100%);
    border: 1px solid rgba(100, 140, 220, 0.18);
    border-left: 3px solid rgba(154, 122, 58, 0.60);
    border-radius: 6px;
    letter-spacing: 0.01em;
}

#haut {
    padding: 14px 6px 8px;
    width: 100%;
    box-sizing: border-box;
}

#form-calcul {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 10px 24px;
    background: linear-gradient(160deg, #0a1425 0%, #0f1e3a 55%, #0a1425 100%);
    border: 1px solid rgba(100, 140, 220, 0.18);
    border-top: 3px solid #9a7a3a;
    border-radius: 8px;
    padding: 18px 24px;
    box-shadow:
        0 6px 28px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(100, 150, 255, 0.05);
}

#champ-date,
#champ-lieu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

#champ-date label,
#champ-lieu label {
    color: #c9a96e;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

#date {
    height: 34px;
    width: 124px;
    border: 1px solid rgba(170, 130, 60, 0.50);
    border-bottom: 2px solid #9a7a3a;
    padding: 0 8px;
    font-size: 0.92em;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.40);
    text-align: center;
    color: #f0e8d0;
    box-sizing: border-box;
    border-radius: 4px;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#date:focus {
    outline: none;
    border-color: #c9a96e;
    box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.20);
}

#address {
    height: 34px;
    width: 230px;
    border: 1px solid rgba(170, 130, 60, 0.50);
    border-bottom: 2px solid #9a7a3a;
    padding: 0 10px;
    font-size: 0.90em;
    background: rgba(0, 0, 0, 0.40);
    color: #f0e8d0;
    box-sizing: border-box;
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#address::placeholder {
    color: rgba(240, 232, 208, 0.38);
}

#address:focus {
    outline: none;
    border-color: #c9a96e;
    box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.20);
}

#hintLieu {
    margin: 6px 0 0;
    font-size: 0.82em;
    color: #8aaccc;
    font-style: italic;
    text-align: center;
}

/* Bouton Calculer */
button.calculer {
    height: 34px;
    padding: 0 22px;
    background-image: linear-gradient(#b19663, #927451);
    border: none;
    border-radius: 5px;
    color: #fff;
    font-family: 'Roboto Slab', serif;
    font-size: 0.95em;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.04em;
    align-self: flex-end;
    transition: background 0.2s;
    white-space: nowrap;
}

button.calculer:hover {
    background-image: linear-gradient(#927451, #b19663);
}

/* ── Loader – overlay plein écran ── */
#loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.60);
    z-index: 9999;
}

#loaderBarre {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 24px 40px;
    border: 1px solid rgba(170, 130, 60, 0.45);
    background: #1a1e2c;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.70);
}

#loaderBarre h1 {
    font-size: 1em;
    color: #e3cfa3;
    font-family: 'Roboto Slab', serif;
    margin: 0 0 12px;
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════
   TABLEAUX DES HEURES PLANÉTAIRES
═══════════════════════════════════════════════════════════ */
#tableaux {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 16px 0;
    box-sizing: border-box;
    width: 100%;
}

/* Surcharge des divs générés par ajaxTab.php */
#gauche,
#droite {
    float: none !important;
    position: static !important;
    top: auto !important;
    flex: 1 1 300px;
    min-width: 0;
    max-width: 480px;
    overflow-x: auto;
}

#tableaux h1 {
    font-size: 0.90em;
    font-weight: bold;
    color: #c9a96e;
    background: linear-gradient(160deg, #0a1425 0%, #0f1e3a 100%);
    border-left: 4px solid #9a7a3a;
    border-bottom: 1px solid rgba(100, 140, 220, 0.18);
    padding: 11px 14px;
    margin: 0;
    text-align: left;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    top: 0;
    position: static;
    border-radius: 6px 6px 0 0;
}

#tableaux table {
    width: 100%;
    box-sizing: border-box;
    border-collapse: collapse;
    border: 1px solid rgba(100, 140, 220, 0.14);
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.50);
}

#tableaux th {
    text-align: center;
    font-size: 0.77em;
    font-weight: 700;
    color: #c9a96e;
    background: linear-gradient(180deg, #0d1830 0%, #091220 100%);
    padding: 8px 6px;
    white-space: nowrap;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-right: 1px solid rgba(100, 140, 220, 0.12);
    border-bottom: 1px solid rgba(170, 130, 60, 0.35);
}

#tableaux th:last-child {
    border-right: none;
}

#tableaux td {
    text-align: center;
    background-color: #d4ca9e;
    font-size: 0.88em;
    padding: 7px 6px;
    color: #1a1610;
    border-right: 1px solid rgba(150, 120, 50, 0.18);
    border-bottom: 1px solid rgba(150, 120, 50, 0.18);
    transition: background 0.12s;
}

#tableaux td:last-child {
    border-right: none;
}

#tableaux tr:nth-child(even) td {
    background-color: #c8be90;
}

#tableaux tr:last-child td {
    border-bottom: none;
}

#tableaux tr:hover td {
    background-color: #e0d8aa;
}

#tableaux td img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════
   PHASE LUNAIRE (bandeau inline)
═══════════════════════════════════════════════════════════ */
#section-lune {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 10px;
    border-top: 1px solid rgba(100, 140, 220, 0.15);
    border-bottom: 1px solid rgba(100, 140, 220, 0.15);
    margin: 8px 0;
    text-align: center;
}

.titre-section {
    font-family: 'Roboto Slab', serif;
    font-size: 1.1em;
    color: #c9a96e;
    background: linear-gradient(90deg, rgba(10, 20, 40, 0.80) 0%, transparent 100%);
    border-left: 4px solid #9a7a3a;
    border-bottom: 1px solid rgba(100, 140, 220, 0.15);
    padding: 8px 12px;
    margin: 0 0 10px;
    text-align: left;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 0 4px 0 0;
}

.hint-outil {
    font-size: 0.88em;
    color: #8aaccc;
    font-style: italic;
    text-align: center;
    margin: 0 0 14px;
    padding: 0 8px;
    line-height: 1.55;
}

/* Surcharge du tableau généré par do_phaselist() */
#lune #tableauPhases {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
    color: #e1e1e1;
    box-sizing: border-box;
}

#lune #tableauPhases tbody {
    display: contents;
}

#lune #tableauPhases tr {
    /* max 4 par ligne : (100% - 3 gaps) / 4 */
    flex: 0 1 calc(25% - 11px);
    min-width: 120px;
    max-width: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(10, 18, 40, 0.85) 0%, rgba(8, 14, 32, 0.90) 100%);
    border: 1px solid rgba(100, 140, 220, 0.22);
    border-top: 2px solid rgba(154, 122, 58, 0.55);
    border-radius: 6px;
    padding: 12px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

#lune #tableauPhases tr:hover {
    border-color: rgba(201, 169, 110, 0.55);
    box-shadow: 0 4px 16px rgba(154, 122, 58, 0.18);
}

/* Lignes vides : masquer (1re ligne explicite + tr vide du foreach) */
#lune #tableauPhases tr:first-child,
#lune #tableauPhases tr:empty,
#lune #tableauPhases tr:not(:has(td)) {
    display: none;
}

#lune #tableauPhases td {
    display: block;
    background: transparent;
    padding: 0;
    color: #c8daf0;
    font-size: 0.88em;
    text-align: center;
}

#lune #tableauPhases td:first-of-type {
    color: #c9a96e;
    font-weight: 700;
    font-size: 0.82em;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#lune #tableauPhases img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════
   CARTE DU CIEL
═══════════════════════════════════════════════════════════ */
#section-carte {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 10px;
    border-top: 1px solid rgba(100, 140, 220, 0.15);
    margin: 8px 0;
}

/* Sélecteur d'heure */
#blocHoraire {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: #c9a96e;
    background: linear-gradient(160deg, #0a1425 0%, #0f1e3a 55%, #0a1425 100%);
    border: 1px solid rgba(100, 140, 220, 0.18);
    border-top: 2px solid rgba(154, 122, 58, 0.60);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.92em;
    font-weight: 500;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.40);
    justify-content: center;
}

#blocHoraire select {
    background: rgba(0, 0, 0, 0.50);
    color: #f0e8d0;
    border: 1px solid rgba(170, 130, 60, 0.50);
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.92em;
    cursor: pointer;
    transition: border-color 0.2s;
}

#blocHoraire select:focus {
    outline: none;
    border-color: #c9a96e;
}

button.calculerCarte {
    height: 30px;
    padding: 0 16px;
    background-image: linear-gradient(#b19663, #927451);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

button.calculerCarte:hover {
    background-image: linear-gradient(#927451, #b19663);
}

/* Zone carte – surcharge des divs inline de ajaxCarte.php */
#blocDate {
    color: #8aaccc;
    font-size: 0.88em;
    text-align: center;
    margin-bottom: 12px;
    font-style: italic;
}

#blocAstro {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
}

/* Surcharge de width/height inline sur #carte */
#carte {
    float: none !important;
    width: 100% !important;
    max-width: 520px !important;
    height: auto !important;
    flex: 0 0 auto;
}

#carte img {
    width: 100% !important;
    height: auto !important;
    display: block;
    border: 3px dashed white;
    box-sizing: border-box;
}

#positionsPlanetes {
    float: none !important;
    width: 100% !important;
    max-width: 400px;
    height: auto !important;
    margin-left: 0 !important;
    color: #eee;
    flex: 1 1 260px;
    text-align: left;
}

#positionsPlanetes table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
    border: 1px solid rgba(100, 140, 220, 0.14);
    border-top: 3px solid #9a7a3a;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

#positionsPlanetes th {
    color: #c9a96e;
    font-weight: 700;
    font-size: 0.78em;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 9px 10px;
    text-align: left;
    background: linear-gradient(180deg, #0d1830 0%, #091220 100%);
    border-bottom: 1px solid rgba(170, 130, 60, 0.35);
    border-right: 1px solid rgba(100, 140, 220, 0.12);
}

#positionsPlanetes th:last-child {
    border-right: none;
}

#positionsPlanetes td {
    background-color: #d4ca9e;
    color: #1a1610;
    padding: 7px 10px;
    font-size: 0.88em;
    border-bottom: 1px solid rgba(150, 120, 50, 0.18);
    border-right: 1px solid rgba(150, 120, 50, 0.15);
    transition: background 0.12s;
}

#positionsPlanetes td:last-child {
    border-right: none;
}

#positionsPlanetes tr:nth-child(even) td {
    background-color: #c8be90;
}

#positionsPlanetes tr:last-child td {
    border-bottom: none;
}

#positionsPlanetes tr:hover td {
    background-color: #e0d8aa;
}

/* Maison lunaire + Cycle tropique : côte à côte */
#positionsPlanetes table:nth-of-type(2),
#positionsPlanetes table:nth-of-type(3) {
    float: left !important;
    width: calc(50% - 6px) !important;
    margin-bottom: 12px;
}

#positionsPlanetes table:nth-of-type(2) {
    margin-right: 12px;
}

#positionsPlanetes table:nth-of-type(3) {
    margin-right: 0;
}

/* Légende aspects */
#positionsPlanetes img[src*="aspects"] {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    opacity: 0.92;
}

/* ═══════════════════════════════════════════════════════════
   ESPACE MEMBRE / CTA
═══════════════════════════════════════════════════════════ */
#boxSondage {
    box-sizing: border-box;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    letter-spacing: 0.05em;
    line-height: 22px;
    margin: 8px auto 0;
    padding: 0 10px 24px;
    text-align: center;
    width: 100%;
    border-top: 1px solid rgba(100, 140, 220, 0.15);
}

#boxCTA {
    padding: 24px 20px;
    line-height: 1.7;
    max-width: 760px;
    margin: 16px auto;
    color: #d8e8f8;
    background: linear-gradient(135deg, rgba(8, 16, 38, 0.92) 0%, rgba(12, 25, 55, 0.88) 100%);
    border: 1px solid rgba(100, 140, 220, 0.22);
    border-top: 3px solid #9a7a3a;
    border-radius: 10px;
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(100, 150, 255, 0.06);
    text-align: left;
}

#boxCTA h2 {
    font-size: 1.4em;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 700;
    color: #e3cfa3;
}

#boxCTA p {
    margin-bottom: 8px;
    font-weight: 600;
}

#boxCTA ul {
    margin: 0 0 18px 16px;
    padding: 0;
    list-style: none;
}

#boxCTA ul li {
    margin-bottom: 6px;
    font-size: 0.97em;
}

#btnCta {
    width: 100%;
    max-width: 420px;
    display: block;
    margin: 0 auto;
    padding: 12px 20px;
    background: linear-gradient(#b19663, #927451);
    color: #fff;
    text-align: center;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1em;
    transition: all 0.2s ease;
    box-sizing: border-box;
    overflow: hidden;
    word-break: keep-all;
}

#btnCta:hover {
    background: linear-gradient(#927451, #b19663);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════
   EXPLICATION DES HEURES PLANÉTAIRES
═══════════════════════════════════════════════════════════ */
#section-heures-texte {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 10px 24px;
    border-top: 1px solid rgba(100, 140, 220, 0.15);
    margin-top: 8px;
    text-align: left;
    color: #c8daf0;
}

.planete-titre {
    color: #c9a96e;
    border-bottom: 1px solid #c9a96e;
}

.texte-explication p {
    text-indent: 10px;
    font-size: 1.1em;
    margin-bottom: 12px;
    line-height: 1.70;
}

.texte-explication ul {
    margin: 0 0 14px 24px;
    padding: 0;
}

.texte-explication ul li {
    font-size: 1.1em;
    margin-bottom: 8px;
    line-height: 1.60;
}

.sous-titre {
    font-family: 'Roboto Slab', serif;
    font-size: 1.4em;
    color: #c9a96e;
    border-left: 4px solid #9a7a3a;
    border-bottom: 1px solid rgba(100, 140, 220, 0.20);
    padding: 3px 0 3px 8px;
    margin: 16px 0 10px;
    letter-spacing: 0.04em;
}

#garantie {
    font-size: 0.83em;
    color: #7a8ea8;
    font-style: italic;
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid rgba(100, 140, 220, 0.18);
}

/* Bloc légende aspects : masqué sur desktop, visible mobile */
.aspects-legende {
    display: none;
}

/* ═══════════════════════════════════════════════════════════
   NAVIGATION ANCRÉE
═══════════════════════════════════════════════════════════ */
#nav-sections {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    background: linear-gradient(180deg, #05091a 0%, #080e24 100%);
    border-top: 1px solid rgba(100, 140, 220, 0.15);
    border-bottom: 2px solid rgba(154, 122, 58, 0.55);
    position: sticky;
    top: 52px;   /* compense le bandeau fixe (~52px) */
    z-index: 200;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#nav-sections::-webkit-scrollbar {
    display: none;
}

#nav-sections a {
    display: block;
    flex-shrink: 0;
    padding: 11px 18px;
    color: #a8c0e0;
    font-family: 'Roboto Slab', serif;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none;
    border-right: 1px solid rgba(100, 140, 220, 0.12);
    white-space: nowrap;
    transition: background 0.18s, color 0.18s;
}

#nav-sections a:last-child {
    border-right: none;
}

#nav-sections a:hover {
    background: rgba(100, 140, 220, 0.10);
    color: #c9a96e;
}

/* Décalage scroll pour compenser le bandeau fixe (48px) + nav sticky (~44px) */
#boxSaveAndSend,
#haut,
#section-lune,
#section-carte,
#boxSondage,
#section-heures-texte {
    scroll-margin-top: 96px;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
#footer {
    width: 100%;
    background: linear-gradient(180deg, #0c1530 0%, #080e22 55%, #04060f 100%);
    background-image: url('../images/foot.png'), linear-gradient(180deg, #0c1530 0%, #080e22 55%, #04060f 100%);
    background-repeat: repeat-x, no-repeat;
    background-size: auto, cover;
    border-top: 2px solid rgba(154, 122, 58, 0.55);
    padding: 28px 20px 22px;
    box-sizing: border-box;
    position: relative;
    text-align: center;
}

#footer-deco {
    color: rgba(201, 169, 110, 0.45);
    font-size: 1.0em;
    letter-spacing: 0.40em;
    margin-bottom: 16px;
}

#copy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 10px;
    color: #8aaccc;
    font-size: 0.90em;
    margin-bottom: 10px;
}

.footer-sep {
    color: rgba(154, 122, 58, 0.55);
    font-size: 1.1em;
    line-height: 1;
}

#contact a {
    color: #c9a96e;
    text-decoration: none;
    border-bottom: 1px solid rgba(201, 169, 110, 0.30);
    transition: color 0.2s, border-color 0.2s;
}

#contact a:hover {
    color: #e3cfa3;
    border-bottom-color: #c9a96e;
}

#footer-tagline {
    font-family: 'Roboto Slab', serif;
    font-size: 0.75em;
    color: rgba(168, 192, 224, 0.45);
    letter-spacing: 0.08em;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   AUTOCOMPLETE (jQuery UI)
═══════════════════════════════════════════════════════════ */
.ui-autocomplete {
    background-color: #1a1e2c !important;
    border: 1px solid rgba(154, 122, 58, 0.55) !important;
    border-radius: 5px;
    list-style: none;
    padding: 4px 0;
    text-align: left;
    font-size: 0.90em;
    z-index: 9999;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
}

/* jQuery UI ≤1.8 : <a> / jQuery UI ≥1.9 : .ui-menu-item-wrapper */
.ui-menu-item a,
.ui-menu-item-wrapper {
    display: block;
    padding: 8px 14px;
    color: #f0e8d0 !important;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.ui-menu-item a:hover,
.ui-menu-item a.ui-state-focus,
.ui-menu-item a.ui-state-active,
.ui-menu-item-wrapper:hover,
.ui-menu-item-wrapper.ui-state-active {
    background-color: rgba(201, 169, 110, 0.18) !important;
    color: #c9a84c !important;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE – Tablette (≤ 768px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    #ban {
        height: 150px;
    }

    #nav-sections {
        justify-content: flex-start;
    }

    #nav-sections a {
        padding: 10px 14px;
        font-size: 0.75em;
    }

    #address {
        width: 180px;
    }

    #blocAstro {
        flex-direction: column;
        align-items: center;
    }

    #carte {
        max-width: 100% !important;
    }

    #positionsPlanetes {
        max-width: 100%;
    }

    #boxCTA {
        padding: 18px 14px;
    }

    #boxCTA h2 {
        font-size: 1.2em;
    }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE – Mobile portrait (≤ 480px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    /* ── Bandeau sticky : compact, jamais en retour à la ligne ── */
    #sticky-newsletter {
        padding: 8px 10px !important;
        gap: 8px !important;
    }

    .banner-text-short {
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ── Header ── */
    #ban {
        height: 100px;
    }

    /* ── Nav : colle sous le bandeau (52px) et wrapping 3+3 ── */
    #nav-sections {
        flex-wrap: wrap;
        overflow-x: visible;
        top: 52px;
    }

    #nav-sections a {
        flex: 1 1 30%;
        padding: 8px 4px;
        font-size: 0.63em;
        letter-spacing: 0;
        text-align: center;
        border-right: 1px solid rgba(100, 140, 220, 0.10);
        border-bottom: 1px solid rgba(100, 140, 220, 0.10);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ── Décalage scroll : bandeau (52px) + nav double (~80px) ── */
    #boxSaveAndSend,
    #haut,
    #section-lune,
    #section-carte,
    #boxSondage,
    #section-heures-texte {
        scroll-margin-top: 140px;
    }

    /* ── Corps ── */
    #corps {
        padding: 0 8px 16px;
    }

    /* ── Bloc intro ── */
    .intro-haut {
        font-size: 0.88em;
        padding: 10px 12px;
        margin: 8px auto 12px;
    }

    /* ── Calcul ── */
    #haut {
        padding: 10px 4px 6px;
    }

    #form-calcul {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 10px;
    }

    #champ-date,
    #champ-lieu {
        width: 100%;
    }

    #date,
    #address {
        width: 100%;
    }

    button.calculer {
        width: 100%;
        height: 40px;
        font-size: 1em;
    }

    /* ── Tableaux heures ── */
    #tableaux {
        flex-direction: column;
        gap: 14px;
        padding: 10px 0;
    }

    #gauche,
    #droite {
        max-width: 100%;
        flex: none;
    }

    #tableaux th,
    #tableaux td {
        font-size: 0.79em;
        padding: 5px 3px;
    }

    #tableaux td img {
        width: 20px;
        height: 20px;
    }

    /* ── Newsletter ── */
    #boxSaveAndSend {
        margin: 12px auto 20px !important;
        border-radius: 8px !important;
    }

    /* Empiler image + formulaire verticalement sur mobile */
    #nl-flex-row {
        flex-direction: column !important;
        align-items: center !important;
    }

    .nl-guide-col {
        width: 100%;
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        padding: 20px 20px 0;
    }

    .nl-guide-col img {
        width: 110px !important;
        height: auto !important;
        flex: none !important;
        object-fit: contain !important;
        border-radius: 4px;
    }

    .nl-form-col {
        padding: 18px 20px 22px !important;
    }

    #btnBoxSaveAndSend {
        width: 100%;
    }

    /* ── Phases lunaires — 2 par ligne ── */
    #section-lune {
        padding: 14px 6px;
    }

    #lune #tableauPhases {
        gap: 8px;
        max-width: 100%;
    }

    #lune #tableauPhases tr {
        flex: 0 1 calc(50% - 5px);
        min-width: 90px;
        max-width: none;
        padding: 8px 10px;
    }

    #lune #tableauPhases img {
        width: 38px;
        height: 38px;
    }

    #lune #tableauPhases td {
        font-size: 0.79em;
    }

    /* ── Carte du ciel ── */
    #section-carte {
        padding: 12px 6px;
    }

    #blocHoraire {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 10px;
        justify-content: flex-start;
        padding: 10px 12px;
    }

    button.calculerCarte {
        flex: 0 0 100%;
        height: 36px;
        margin-top: 2px;
    }

    #positionsPlanetes table {
        font-size: 0.82em;
    }

    /* Tables maison / cycle : pleine largeur sur mobile */
    #positionsPlanetes table:nth-of-type(2),
    #positionsPlanetes table:nth-of-type(3) {
        float: none !important;
        width: 100% !important;
        margin-right: 0 !important;
    }

    /* ── CTA abonnement ── */
    #boxCTA {
        padding: 16px 12px;
    }

    #boxCTA h2 {
        font-size: 1.05em;
    }

    #boxCTA ul li {
        font-size: 0.88em;
    }

    #btnCta {
        font-size: 0.95em;
        padding: 13px 10px;
        max-width: 100%;
        width: 100%;
    }

    /* ── Guide / explication ── */
    #section-heures-texte {
        padding: 12px 6px 18px;
    }

    .texte-explication p {
        font-size: 0.87em;
        text-indent: 6px;
    }

    .texte-explication ul li {
        font-size: 0.85em;
    }

    .sous-titre {
        font-size: 1.15em;
    }

    .planete-titre {
        font-size: 0.97em;
    }

    /* ── Légende aspects : visible en portrait mobile ── */
    .aspects-legende {
        display: block;
    }

    /* ── Footer ── */
    #footer {
        padding: 18px 12px 14px;
    }

    #footer-deco {
        font-size: 0.85em;
        margin-bottom: 10px;
        letter-spacing: 0.25em;
    }

    #copy {
        font-size: 0.80em;
    }

    #footer-tagline {
        font-size: 0.68em;
    }

    #positionsPlanetes table {
        font-size: 0.82em;
    }

    /* CTA */
    #boxCTA {
        padding: 16px 12px;
    }

    #boxCTA h2 {
        font-size: 1.1em;
    }

    #boxCTA ul li {
        font-size: 0.88em;
    }

    #btnCta {
        font-size: 0.95em;
        padding: 13px 10px;
        max-width: 100%;
        width: 100%;
    }

    /* Explication */
    #section-heures-texte {
        padding: 14px 6px 20px;
    }

    .texte-explication p {
        font-size: 0.88em;
    }

    .texte-explication ul li {
        font-size: 0.85em;
    }

    /* Footer */
    #footer {
        padding: 20px 12px 16px;
    }

    #copy {
        font-size: 0.82em;
    }

    #footer-deco {
        font-size: 0.88em;
        margin-bottom: 12px;
    }

    #footer-tagline {
        font-size: 0.70em;
    }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE – Très petits écrans (≤ 360px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
    #ban {
        height: 90px;
    }

    #lune #tableauPhases {
        gap: 8px;
    }

    #lune #tableauPhases tr {
        flex: 0 1 calc(50% - 5px);
        min-width: 80px;
        padding: 8px 10px;
    }

    #lune #tableauPhases img {
        width: 34px;
        height: 34px;
    }

    #tableaux th,
    #tableaux td {
        font-size: 0.76em;
    }
}