@font-face {
    font-family: Marianne;
    src: url('font/Marianne-Regular.woff') format("woff");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: Marianne;
    src: url('font/Marianne-Bold.woff') format("woff");
    font-weight: bold;
    font-style: normal;
}

:root {
    --primary: #000091;
    --primary-dark: #00006b;
    --primary-light: #ececff;
    --bg: #f5f5f5;
    --surface: #ffffff;
    --border: #e7e7e7;
    --text: #1e1e1e;
    --text-muted: #6a6a6a;
    --text-light: #929292;
    --shadow-lg: 0 8px 40px rgba(0,0,80,0.14);
    /* compat */
    --bf500: #000091;
    --g700: #383838;
}

* {
    margin: 0;
    padding: 0;
    outline: none;
    border: none;
    box-sizing: border-box;
    font-family: Marianne, arial, sans-serif;
}

body {
    background: var(--bg);
    min-height: 100vh;
}

.app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Banner --- */
.app .banner {
    width: 100%;
    padding: 1rem 1.75rem;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 4px solid var(--primary);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app .banner img {
    height: 2.4rem;
}

.banner-sep {
    width: 1px;
    height: 2rem;
    background: var(--border);
    flex-shrink: 0;
}

.app .banner h1 {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: bold;
    margin: 0;
    line-height: 1.35;
}

.banner-tag {
    font-size: 0.67rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.22rem 0.65rem;
    border-radius: 2px;
    white-space: nowrap;
    align-self: center;
}

/* --- Notice interne --- */
.notice-interne {
    background: #f5f5ff;
    border-left: 4px solid var(--primary);
    padding: 0.6rem 1.75rem;
    font-size: 0.77rem;
    color: #444;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    line-height: 1.5;
}

.notice-interne strong {
    color: var(--primary);
}

/* --- Old .text div hidden --- */
.text {
    display: none !important;
}

/* --- Form area --- */
.formm {
    flex: 1;
    padding: 2rem 1rem 2.5rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.form-wrapper {
    width: 100%;
    max-width: 560px;
}

/* --- Section header --- */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    padding: 0 0.1rem;
}

.section-header > img {
    height: 1.4rem;
    opacity: 0.55;
    flex-shrink: 0;
}

.section-header-info h2 {
    font-size: 1rem;
    color: var(--text);
    font-weight: bold;
}

.section-header-info p {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.4;
}

/* --- Form card --- */
.form {
    background: var(--surface);
    border: 1px solid #d0d0e0;
    border-top: 3px solid var(--primary);
    box-shadow: 0 2px 16px rgba(0,0,80,0.09);
    padding: 1.75rem;
}

.form label {
    font-size: 0.77rem;
    font-weight: bold;
    color: var(--text);
    display: block;
    margin-bottom: 0.3rem;
}

.form .input {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.35rem;
    position: relative;
}

.form .input input,
.form .input select {
    width: 100%;
    background: #f0f0f0;
    padding: 0.68rem 1rem;
    border-radius: 4px 4px 0 0;
    border-bottom: 2px solid #9c9c9c;
    font-size: 0.88rem;
    color: var(--text);
    transition: border-color 160ms, background 160ms;
    appearance: none;
    -webkit-appearance: none;
}

.form .input input:focus,
.form .input select:focus,
.form .input select:active {
    background: var(--primary-light);
    border-bottom: 2px solid var(--primary);
}

.form .input input::placeholder {
    color: var(--text-light);
    font-size: 0.82rem;
}

.form .input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

.form button {
    width: 100%;
    background: var(--primary);
    padding: 0.84rem 1rem;
    margin-top: 0.5rem;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 140ms;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form button:hover {
    background: var(--primary-dark);
}

/* --- Address hint --- */
#address {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* --- Autocomplete dropdown --- */
#establishments {
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    box-shadow: 0 4px 16px rgba(0,0,80,0.1);
    max-height: 200px;
    overflow-y: auto;
}

/* --- Table --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
}

th, td {
    border: 1px solid var(--border);
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
}

th {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: bold;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 560px;
    margin: 2rem auto;
    padding: 2rem;
    border-top: 3px solid var(--primary);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-content h2 {
    font-size: 1rem;
    color: var(--text);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.modal-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1;
    transition: color 120ms;
}

.close:hover {
    color: var(--text);
}

.azoz {
    display: flex;
    align-items: flex-start;
}

/* --- Spinner --- */
.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 1.5rem auto;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Footer --- */
.interne-footer {
    background: white;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-align: center;
    padding: 1rem 1.5rem;
}

/* --- Notification --- */
#notification-container {
    position: fixed;
    bottom: 1rem;
    top: auto; /* évite l'étirement : ne pas ancrer en haut ET en bas à la fois */
    right: 1rem;
    z-index: 9999;
    max-width: min(300px, 90vw);
    /* notifications purement décoratives : ne jamais bloquer les taps sur le formulaire.
       pointer-events s'hérite, donc les .notification enfants sont aussi non-interactives. */
    pointer-events: none;
}

/* --- Misc --- */
.highlight { background: var(--primary); color: white; }
.caca { filter: blur(10px); -webkit-filter: blur(10px); }
.button { background: #4CAF50; color: white; padding: 10px 20px; display: inline-block; font-size: 16px; margin-top: 20px; cursor: pointer; }

/* --- Responsive mobile --- */
@media (max-width: 560px) {
    .app .banner {
        padding: 0.8rem 1rem;
    }

    .banner-tag {
        display: none;
    }

    .banner-sep {
        display: none;
    }

    .app .banner img {
        height: 1.8rem;
    }

    .app .banner h1 {
        font-size: 0.88rem;
        white-space: nowrap;
    }

    .notice-interne {
        padding: 0.6rem 1rem;
        font-size: 0.74rem;
    }

    .formm {
        padding: 1.25rem 0.75rem 2rem;
    }

    .form {
        padding: 1.25rem;
    }

    .form label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    /* Tap targets min 48px + empêche le zoom iOS (font >= 16px) */
    .form .input input,
    .form .input select {
        min-height: 48px;
        font-size: 1rem;
        padding: 0.9rem 1rem;
    }

    .form button {
        min-height: 52px;
        font-size: 1rem;
        padding: 1rem;
    }

    .form .input-group {
        grid-template-columns: 1fr;
    }

    .form .input {
        margin-bottom: 1.5rem;
    }

    .section-header {
        margin-bottom: 1rem;
    }

    .section-header-info h2 {
        font-size: 0.95rem;
    }

    .interne-footer {
        font-size: 0.68rem;
        padding: 0.9rem 1rem;
    }

    /* Modal close button plus grand */
    .close {
        font-size: 2rem;
        top: 0.75rem;
        right: 1rem;
        padding: 0.5rem;
    }
}
