/* =========================================================================
   Police Intermarché (importée depuis le site itmbeaujeu)
   ========================================================================= */
@font-face {
    font-family: Itm;
    src: url(../assets/fonts/intermarche_regular.otf);
}

@font-face {
    font-family: Itm;
    src: url(../assets/fonts/intermarche_bold.otf);
    font-weight: bold;
}

@font-face {
    font-family: Itm;
    src: url(../assets/fonts/intermarche_heavy.otf);
    font-weight: 900;
}

@font-face {
    font-family: Itm;
    src: url(../assets/fonts/intermarche_light.otf);
    font-weight: 100;
}

@font-face {
    font-family: Itm;
    src: url(../assets/fonts/intermarche_demi.otf);
    font-weight: 500;
}

/* =========================================================================
   Base / variables
   ========================================================================= */
:root {
    --primary: #fb4b34;
    --primary-dark: #e0341d;
    --box-bg: #f1ece2;
    --text-dark: #1a1a1a;
    --text-muted: #666;
}

html,
body {
    background: #ffffff;
    margin: 0;
}

body {
    font-family: Itm;
    color: var(--text-dark);
}

/* On neutralise les éléments décoratifs de l'ancien master (header/ballon/footer) */
.header,
.headerSpeadLines,
.ballFooter {
    display: none;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
    width: 100%;
    padding: 0;
    text-align: center;
    background: #fff;
    color: #1a4158;
}

.footer a {
    color: #1a4158;
    text-decoration: underline;
    cursor: pointer;
}

.form {
    width: 100%;
}

/* =========================================================================
   Bandeau hero (bannerv3)
   Full-bleed : la bannière déborde du padding de la page (10px haut, 18px côtés)
   pour toucher les bords, alors que le reste du contenu garde son padding.
   ========================================================================= */
.hero-banner {
    display: block;
    width: calc(100% + 36px);
    max-width: none;
    margin: -10px -18px 0;
}

/* Image de section sous le header (carte carburant optin, urne merci) */
.section-img {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 18px auto 0;
}

/* Visuel pleine largeur : les pompes à essence touchent les bords de l'écran,
   comme le hero-banner (déborde du padding latéral de 18px) */
.section-img--bleed {
    width: calc(100% + 36px);
    max-width: none;
    margin: 18px -18px 0;
}

/* Légende sous le visuel (« À venir récupérer dans votre magasin ») */
.section-caption {
    font-size: 13px;
    font-weight: 500;
    margin: 4px auto 18px;
}

/* =========================================================================
   Bouton de fermeture (rond noir, haut droite)
   ========================================================================= */
.close-round {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    z-index: 10;
}

/* =========================================================================
   Boutons
   ========================================================================= */
.btn {
    display: block;
    border: 0;
    border-radius: 10px;
    padding: 14px 0;
    width: 90%;
    max-width: 340px;
    font-size: clamp(18px, 5.5vw, 22px);
    font-weight: 700;
    font-family: 'Itm';
    cursor: pointer;
    margin: 12px auto;
    background: var(--primary);
    color: #fff;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .15);
}

.btn:hover {
    background: var(--primary-dark);
}

.btn--secondary {
    background: var(--primary);
}

.btn--disabled,
.btn:disabled {
    background: #bdbdbd;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

/* =========================================================================
   Champ texte
   ========================================================================= */
.textbox {
    display: block;
    width: 90%;
    max-width: 340px;
    height: 44px;
    margin: 0 auto;
    padding: 5px 18px;
    border-radius: 14px;
    border: 1px solid #cfcfcf;
    box-shadow: 0 0 6px rgba(0, 0, 0, .08);
    color: var(--text-dark);
    font-family: 'Itm';
    font-size: 16px;
    box-sizing: border-box;
}

.textbox::placeholder {
    color: #9a9a9a;
}

/* =========================================================================
   Page optin
   ========================================================================= */
.optin-page {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 440px;
    margin: 0 auto;
    padding: 10px 18px 30px;
}

.optin-page .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.optin-page h2 {
    font-weight: 900;
    font-size: clamp(22px, 6.5vw, 28px);
    line-height: 1.15;
    margin: 18px auto 24px;
}

.optin-page h2 .highlight {
    display: block;
    font-size: 1.15em;
}

/* Libellé « Confirmez votre adresse e-mail : » */
.optin-label {
    font-size: clamp(16px, 5vw, 20px);
    margin: 6px auto 14px;
}

/* Encart d'information (beige) */
.optin-box {
    position: relative;
    background: var(--box-bg);
    border-radius: 16px;
    padding: 22px 18px;
    width: 100%;
    max-width: 360px;
    font-weight: bold;
    font-size: clamp(15px, 4.6vw, 18px);
    line-height: 1.25;
    box-sizing: border-box;
    margin: 12px auto;
}

/* Icône flottante (email / sms) en haut à droite de l'encart */
.optin-box__icon {
    position: absolute;
    top: -25px;
    right: -10px;
    width: 48px;
    height: auto;
    z-index: 2;
    transform-origin: center;
    animation: optin-icon-pulse 1.6s ease-in-out infinite;
}

@keyframes optin-icon-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

@media (prefers-reduced-motion: reduce) {
    .optin-box__icon {
        animation: none;
    }
}

/* Encart d'information (beige, écran merci) */
.info-box {
    position: relative;
    background: var(--box-bg);
    border-radius: 16px;
    padding: 22px 18px;
    margin: 20px auto;
    width: 100%;
    max-width: 360px;
    font-weight: bold;
    font-size: clamp(14px, 4.4vw, 17px);
    line-height: 1.3;
    box-sizing: border-box;
}

/* Texte légal bas de page */
.legal-text {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
    margin: 30px auto 10px;
    max-width: 380px;
}

/* Lien règlement */
.reglement-link {
    display: inline-block;
    margin: 6px auto 0;
    font-size: 12px;
    color: var(--text-dark);
    text-decoration: underline;
}

/* =========================================================================
   Home : acceptation du règlement
   ========================================================================= */
.reglement-intro {
    font-size: clamp(16px, 5vw, 20px);
    font-weight: 700;
    line-height: 1.25;
    margin: 20px auto 18px;
}

.reglement-check {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    text-align: left;
    max-width: 340px;
    margin: 0 auto 8px;
    font-size: clamp(14px, 4vw, 16px);
}

.reglement-check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

.reglement-check a {
    color: var(--text-dark);
    text-decoration: underline;
}

/* =========================================================================
   Écran Merci / confirmation
   ========================================================================= */
.merci-page {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 440px;
    margin: 0 auto;
    padding: 10px 18px 30px;
}

.merci-page .merci-title {
    font-size: clamp(30px, 9vw, 42px);
    font-weight: 900;
    margin: 10px auto 4px;
}

.merci-page .merci-subtitle {
    font-size: clamp(17px, 5vw, 20px);
    font-weight: 900;
    line-height: 1.2;
    margin: 0 auto 10px;
}

.merci-page .merci-note {
    font-weight: bold;
    margin: 0 auto 10px;
}

/* =========================================================================
   Modale (crédits / spinner)
   ========================================================================= */
.btn--main {
    background: #fff;
    color: #1b3688;
    border: 1.5px solid #c5cde8;
}

.modal {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(19, 63, 87, 0.9) 0%, rgba(10, 31, 46, 0.95) 100%);
    color: #000;
    z-index: 1000;
}

.modal .closeBtn {
    position: absolute;
    top: 10px;
    right: 10px;
}

.modal--hidden {
    display: none;
}

.modal--center {
    align-items: center;
}

.modal__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90vw;
    max-width: 800px;
    min-height: 100px;
    max-height: 90vh;
    background: #fff;
    margin-top: 1.5rem;
    border-radius: 15px;
    text-align: center;
    padding: 20px 10px;
    animation: anim-modal 0.3s ease;
}

.modal__content--mt {
    margin-top: 10rem;
}

.modal__content.close {
    animation: close-modal 0.3s ease;
}

.modal__content .close-btn {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    z-index: 100;
    cursor: pointer;
}

.modal__content__quit {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    z-index: 10;
}

.modal__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2rem;
    gap: 20px;
    overflow: auto;
}

.modal__footer {
    padding: 10px;
    width: 100%;
    text-align: center;
}

.modal__footer p {
    font-size: 0.6rem;
}

.credit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.credit h3 {
    color: #1b3688;
    font-size: 2rem;
}

@keyframes anim-modal {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

@keyframes close-modal {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(0);
    }
}

/* =========================================================================
   Page Reglement (reglement.html - page autonome, hors Site.Master)
   ========================================================================= */
.reglement-body {
    background: #fff;
    margin: 0;
}

.reglement-doc {
    max-width: 800px;
    margin: 0 auto;
    padding: 62px 20px 60px;
    text-align: left;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-dark);
}

.reglement-doc h1 {
    font-size: clamp(22px, 6vw, 30px);
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    margin: 10px 0 4px;
}

.reglement-doc__subtitle {
    text-align: center;
    font-weight: 700;
    font-size: clamp(15px, 4.5vw, 19px);
    margin: 0 0 28px;
}

.reglement-doc h2 {
    font-size: clamp(16px, 4.6vw, 19px);
    font-weight: 700;
    color: var(--primary);
    margin: 32px 0 10px;
}

.reglement-doc p {
    margin: 0 0 12px;
    text-align: justify;
}

.reglement-doc ul {
    margin: 0 0 12px;
    padding-left: 22px;
}

.reglement-doc li {
    margin-bottom: 8px;
    text-align: justify;
}

.reglement-doc a {
    color: var(--primary-dark);
    text-decoration: underline;
    word-break: break-word;
}

.reglement-doc__address {
    text-align: left;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Annexe 1 : liste des magasins non-participants, en colonnes
   (1 a 3 selon la largeur, 150px mini par colonne) */
.reglement-doc__stores {
    columns: 3 150px;
    column-gap: 24px;
    list-style: none;
    padding-left: 0;
    font-size: 14px;
}

.reglement-doc__stores li {
    margin-bottom: 4px;
    text-align: left;
    break-inside: avoid;
}

/* Bouton "Retour" du reglement : flottant en haut a gauche, fixe au viewport
   pour rester accessible pendant le scroll du document.
   L'override de couleur/soulignement est necessaire car .reglement-doc a
   est plus specifique que .btn */
.reglement-doc__back {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 10;
}

.reglement-doc__back .btn {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 9px 20px;
    font-size: 15px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
}
