@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --blue-dark: #063b78;
    --blue: #07529d;
    --blue-bright: #08ace2;
    --blue-soft: #dfeefa;
    --text: #153b61;
    --muted: #52708a;
    --cream: #f3e3c6;
    --white: #ffffff;
    --red: #e3262e;
    --shadow: 0 7px 18px rgba(6, 59, 120, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: #eef3f7;
    font-family: 'Montserrat', Arial, sans-serif;
}

button,
input {
    font: inherit;
}
select:disabled {
    background-color: #c2ccd6;
    border: 1px solid #7b8794;
    color: #2d3748;
    opacity: 1;
    cursor: not-allowed;
    -webkit-text-fill-color: #2d3748;
}
.full-width,
.site-banner {
    display: block;
    width: 100%;
    height: auto;
}

.site-header {
    width: 100%;
    background: var(--blue-dark);
}

.page-container {
    width: min(1840px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 60px;
}

h1 {
    margin: 25px 0 15px;
    color: #0a3f89;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(2.3rem, 4vw, 3rem);
    line-height: 1;
}

/* Formulaire */
.form-group {
    text-align: center;
}

.form-control {
    display: block;
    width: 85%;
    max-width: 800px;
    min-height: 52px;
    margin: 0 auto 10px;
    padding: 12px 15px;
    color: var(--text);
    background: #f8fcfe;
    border: 1px solid #bcd9e9;
    border-radius: 11px;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-control:hover,
.form-control:focus {
    border-color: var(--blue);
}

.form-control:focus {
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(8, 172, 226, 0.16);
}

/* Titres des semaines et des jours */
.dayscolortxt {
    margin: 0;
    color: #536f89;
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    font-weight: 500;
    text-align: center;
}

.week-title {
    position: relative;
    text-align: center;
}

.week-title::before,
.week-title::after {
    content: '';
    display: inline-block;
    width: 120px;
    height: 4px;
    margin: 0 15px;
    background: #0db4ec;
    border-radius: 4px;
    vertical-align: middle;
}
.week-separator{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:20px;

    margin:40px auto 20px auto;

    color:#4f6b85;
    font-family:'Barlow Condensed',sans-serif;
    font-size:38px;
    font-weight:700;
}

.week-separator::before,
.week-separator::after{
    content:'';
    flex:1;

    max-width:300px;
    height:4px;

    background:linear-gradient(
        90deg,
        transparent,
        #08ace2,
        #08ace2,
        transparent
    );

    border-radius:10px;
}
/* Tableau principal du programme */
table {
    width: 96%;
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 14px 10px;
    table-layout: fixed;
}

td {
    width: 20%;
    vertical-align: top;
}

/* Cartes d'activités */
.SdF,
.OuiSéniors,
.ailleurs,
.activity-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 300px;
    min-height: 240px;
    margin: 0;
    overflow: hidden;
    background: var(--white);
    border-radius: 24px;
    table-layout: fixed;
max-height:none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.SdF {
    background: #fbfbfb;
    border: 4px solid #c0cad4;
}

.OuiSéniors {
    background: var(--cream);
    border: 4px solid #e6a12d;
}

.ailleurs {
    background: var(--blue-soft);
    border: 4px solid #4aa5ff;
}

.SdF:hover,
.OuiSéniors:hover,
.ailleurs:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Entête des cartes */
thead,
.SdF thead,
.OuiSéniors thead,
.ailleurs thead {
    background: transparent !important;
}

thead th,
.SdF thead th,
.OuiSéniors thead th,
.ailleurs thead th {
    padding: 8px 10px;
    color: #002c71 !important;
    background: none !important;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
}

thead th span {
color:#6f8093 !important;
font-size:12px !important;
font-weight:500;
line-height:1.1 !important;
display:block;
}

/* Texte principal des cartes */
.dayscolorinsidetxt {
    margin: 0;
    color: #00377d;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(30px,  2vw, 38px);
    font-weight: 800;
    line-height: 0.95;
    text-align: center;
    overflow-wrap: anywhere;
}

.stormyblue {
    margin: 15px 0 0;
    color: #00377d;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(24px, 1.8vw, 30px);
    font-weight: 700;
    line-height: 1;
    text-align: right;
    overflow-wrap: anywhere;
}
/* Texte principal des cartes */
.cbdayscolorinsidetxt {
    margin: 0;
    color: #00377d;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(14px, 1.8vw, 20px);
text-align: left;
    font-weight: 700;
    line-height: 0.95;
    overflow-wrap: anywhere;
}
/* Carte normale avec une seule activité */
.SdF tbody td,
.OuiSéniors tbody td,
.ailleurs tbody td {
    height: 172px;
    padding: 20px 28px;
    vertical-align: middle;
}

/*
   Cartes combo : plusieurs lignes dans le tbody.
   Ces règles empêchent les horaires et disponibilités de devenir énormes.
*/
.activity-card tbody tr {
    height: auto;
}

.activity-card tbody tr + tr td {
    border-top: 1px solid rgba(6, 59, 120, 0.12);
}

.activity-card tbody tr td {
    width: auto;
    height: auto;
    padding: 8px 6px;
    vertical-align: middle;
}

.activity-card tbody tr td:first-child {
    width: 56%;
    text-align: left;
}

.activity-card tbody tr td:last-child {
    width: 44%;
}

.activity-card tbody tr .dayscolorinsidetxt {
    font-size: clamp(20px, 1.15vw, 20px);
    line-height: 1;
    overflow-wrap: normal;
    text-align: left;
}

.activity-card tbody tr .stormyblue {
    margin: 0;
    font-size: clamp(15px, 1.05vw, 19px);
    line-height: 1.05;
    text-align: right;
}

/* Cases à cocher */
input[type='checkbox'] {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    accent-color: #2095f2;
}

.larger {
    transform: scale(1.15);
    transform-origin: center;
    accent-color: #0c4291;
}

/* Blocs modernes éventuellement utilisés par la nouvelle page */
.identity-section,
.validation-section {
    max-width: 1050px;
    margin: 0 auto 42px;
    padding: 28px;
    background: var(--white);
    border: 1px solid rgba(6, 59, 120, 0.1);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.identity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.identity-address {
    grid-column: 1 / -1;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-group label {
    color: var(--blue-dark);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.consent-card {
    display: flex;
    padding: 18px;
    gap: 14px;
    align-items: flex-start;
    color: var(--text);
    background: #f8fcfe;
    border: 1px solid #c8deea;
    border-radius: 14px;
    cursor: pointer;
    line-height: 1.55;
}

.submit-button {
    display: flex;
    width: min(100%, 450px);
    min-height: 58px;
    margin: 24px auto 0;
    padding: 12px 25px;
    align-items: center;
    justify-content: space-between;
    color: var(--white);
    background: linear-gradient(120deg, var(--blue-dark), var(--blue-bright));
    border: 0;
    border-radius: 15px;
    box-shadow: 0 8px 19px rgba(6, 59, 120, 0.25);
    cursor: pointer;
    font-weight: 800;
}

/* Responsive */
@media (max-width: 1200px) {
    table {
        width: 99%;
        border-spacing: 8px;
    }

    .dayscolorinsidetxt {
        font-size: 24px;
    }

    .stormyblue {
        font-size: 22px;
    }
}

@media (max-width: 760px) {
    .page-container {
        width: calc(100% - 18px);
        padding-top: 22px;
    }

    .identity-grid {
        grid-template-columns: 1fr;
    }

    .identity-address {
        grid-column: auto;
    }

    .form-control {
        width: 95%;
    }

    .week-title::before,
    .week-title::after {
        width: 35px;
        margin: 0 7px;
    }

    /* Le tableau historique reste horizontal pour préserver ses cinq jours. */
    body > table {
        min-width: 1050px;
    }

    body {
        overflow-x: auto;
    }
}
