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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #E4E039 0%, #AAC955 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    flex-direction: column;
}

footer {
    text-align: left;
    display: flex;
    flex-direction: column;
    background: rgb(193, 192, 192);
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 20px;
    /*max-width: 600px; */
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.8em;
    justify-content: left;
    margin-top: 20px;
}


.intro {
    padding: 40px;
    max-width: 600px;
}


.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 1200px;   /* adapté à ton contenu */
    width: 100%;
    display: flex;
    flex-direction: column;
}

.header-image {
    text-align: center;
    margin-bottom: 20px;
}

.header-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #474090;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2em;
}

h2 {
    color: #333;
    text-align: center;
   /* margin-bottom: 30px; */
    font-size: 1.5em;
}
h3 {
    color: #474090;
    font-size: 1.2em;
}
h4 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.7em;
    font-style: italic;
}

.gps-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

.gps-info h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.gps-status {
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 15px;
}

.gps-status.loading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.gps-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gps-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.gps-coords {
    background: white;
    border-radius: 8px;
    padding: 15px;
}

.gps-coords p {
    color: #495057;
    margin: 8px 0;
    font-size: 0.95em;
}

.gps-coords span {
    color: #E4E039;
    font-weight: bold;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    color: #495057;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
}

label[required]:after {
    content: " *";
    color: #dc3545;
}

.required {
    color: #dc3545;
}

.form-hint {
    display: block;
    color: #6c757d;
    font-size: 0.85em;
    margin-top: 5px;
    font-style: italic;
}

.form-error {
    display: block;
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
textarea {
    resize: vertical;
    min-height: 100px;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #E4E039;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

/* POUR LES TABLEAUX */

/* Conteneur principal (où se trouve ton tableau) */
.table-container {
    flex: 1; /* prend tout l'espace vertical disponible */
    padding: 15px;

    /* IMPORTANT : permet au tableau de scroller si trop large */
    overflow-x: auto; 
    overflow-y: auto;

    max-width: 100%;
    box-sizing: border-box;
    background: #fafafa;
}

table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    /*table-layout: auto;*/
    display: block;
    white-space: nowrap;
}
th, td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
    font-size: 11px;
    /*overflow: hidden;*/
    white-space: nowrap;
    /*text-overflow: ellipsis;*/
}

/* Colonnes constats et propositions */
td.constats,
td.propositions {
    white-space: normal;      /* autorise les retours à la ligne */
    line-height: 1.3em;       /* hauteur d'une ligne */
    max-height: 3.9em;        /* hauteur fixe (2 lignes ici) */
    height: 3.9em;            /* pour garder la ligne fixe */
    overflow: hidden;         /* cache le texte en trop */
    text-overflow: ellipsis;  /* (optionnel) ajoute "..." */
    min-width: 200px;
}

th {
    background: #f7f7f7;
    cursor: pointer;
    padding-right: 15px;
    position: relative;
}
th.sort-asc::after {
    content: "▲";
    font-size: 0.7em;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}
th.sort-desc::after {
    content: "▼";
    font-size: 0.7em;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

/* -------------------------
   LIGNE PRINCIPALE
-------------------------- */
tr.main-row {
    background: #ffffff;
    max-height: 60px;
}

tr.main-row:hover {
    background: #f2f7ff;
    cursor: pointer;
}

/* -------------------------
   LIGNE DÉTAIL
-------------------------- */
tr.details-row {
    background: #f4f4f4;
    display: inline-block; /* caché par défaut */
}

tr.details-row td {
    padding: 12px 15px;
    border-top: 1px solid #ccc;
    font-size: 0.95em;
    line-height: 1.2em;
}

/* -------------------------
   BOUTON DÉTAIL
-------------------------- */
.btn-details {
    padding: 5px 10px;
    background: #2b6cb0;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

.btn-details:hover {
    background: #245a96;
}

#filter {
    padding: 8px;
    width: 120px;
}

        /* TOOLS BAR */
        .toolbar {
            margin-bottom: 15px;
            display: flex;
            gap: 20px;
            align-items: flex-start;
            flex-wrap: wrap;
            box-sizing: border-box;
        }

        .toolbar input, .toolbar select, .toolbar button {
            padding: 6px 10px;
            border: 1px solid #aaa;
            border-radius: 4px;
        }

         /* COLUMN TOGGLE MENU */
        .columns-toggle {
            border: 1px solid #aaa;
            padding: 10px;
            background: #fafafa;
            display: flex;
            flex-wrap: wrap;
            gap: 12px 20px;
            max-width: 100%;
            box-sizing: border-box;
        }

        .columns-toggle label {
            white-space: nowrap;
            display: inline-flex;
        }

        /* PAGINATION */
        .pagination {
            margin-top: 15px;
            display: flex;
            gap: 10px;
        }

        .pagination button {
            padding: 6px 12px;
        }


/* BOUTON DE LA PAGE INITIALE */

.button-init-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 20px;
        }

        .button-init {
            border: none;
            color: white;
            padding: 15px 32px;
            text-align: center;
            text-decoration: none;
            font-size: 1.1em;
            font-weight: 600;
            margin: 10px;
            cursor: pointer;
            min-width: 200px;
            width: 80%;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: space-around;
            transition: all 0.3s ease;
            background:linear-gradient(135deg, #E4E039 0%, #AAC955 100%);
            box-shadow: 0 4px 15px rgba(168, 234, 102, 0.4);
        }

        .button-init img {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            object-fit: cover;
            background-color: transparent;
        }

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #E4E039 0%, #AAC955 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 234, 102, 0.4);
    text-align: center;
}

.submit-btn input {
    font-weight: bold;
    font-size: 1.5em;
    color: white;
    background: transparent;
    border: none;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
  cursor: pointer;
  pointer-events: none;
  background: linear-gradient(135deg, #717170 0%, #747469 100%);
  box-shadow: 0 4px 15px rgba(102, 102, 101, 0.4);
}

#btn_valid_echange {
  cursor: pointer;
  pointer-events: none;
  background: linear-gradient(135deg, #717170 0%, #747469 100%);
  box-shadow: 0 4px 15px rgba(102, 102, 101, 0.4);
}

#btn_valid_echange.enabled {
  opacity: 1;
  pointer-events: auto;
  background: linear-gradient(135deg, #E4E039 0%, #AAC955 100%);
}
  
.success-message {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    animation: slideIn 0.3s ease;
}

.success-message h3 {
    color: #155724;
    margin-bottom: 15px;
}

.success-message p {
    color: #155724;
    margin: 8px 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* pour la page échanger et participer bouton - option avec image */
.block {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
}

.option-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 18px !important;
    align-items: flex-start !important;
    width: 100vw;
    max-width: 100%;
    box-sizing: border-box;
}

.option-grid-theme {
    display: flex !important;
    flex-direction: column;
    width: 100vw;
    max-width: 100%;
    box-sizing: border-box;
}


.option {
    display: flex !important;
    flex-direction: row !important;   /* image puis label */
    align-items: center !important;
     /* contrainte pour 2 items par ligne :
       calc(50% - gap/2) -> on met 50% - 9px (gap/2) 
    flex: 0 0 calc(50% - 9px) !important;
    */
     /* Sécurité : min/max pour autoriser le shrink/overflow */
    min-width: 0 !important;
    /*max-width: calc(50% - 9px) !important;*/
    min-height: 1px !important;
    box-sizing: border-box !important;
    object-fit: contain;
    cursor: pointer !important;
    border: 2px solid #ccc !important;
    border-radius: 8px !important;
    padding: 10px !important;
    text-align: center !important;
    margin-top: 5px;
    transition: border-color 0.3s, background-color 0.3s;
    user-select: none;
}
    .option.selected {
      border-color: #474090;
      background-color: #e4e2f9;
    }

    .option label {
        padding: 5px;
        display: block; 
        background-color: transparent;
        /*background-color: #f9f9f9;
        align-content: center;*/
        width: 100vw;
        max-width: 100%;
        min-width: 0;
        /*object-fit: contain;*/
        white-space: normal !important;
        word-break: break-word;
        hyphens: auto;
        text-align: center;
        overflow-wrap: anywhere;
    }


    .option img {
        display: block !important;
        width: 80px !important;
        height: 80px !important;
        object-fit: cover !important;
        margin: 0 auto 8px !important;  
        max-width: none !important; 
        background-color: transparent;
    }
    /* hover effect */
    .option:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

.option-label-theme{
    padding: 5px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    background-color: #f9f9f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100vw;
    max-width: 100%;
    min-width: 0;
}

.zone-video-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 20px;
        }

/* icon d'info */
.info-icon {
  display: inline-block;
  margin-left: 10px;
  cursor: pointer;
  font-size: 1em;
  vertical-align: middle;
  position: relative;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #333;
  color: #fff;
  text-align: left;
  padding: 8px;
  border-radius: 4px;
  position: absolute;
  z-index: 10;
  bottom: 125%; /* positionner au-dessus de l’icône */
  left: 50%;
  margin-left: -100px; /* moitié de la largeur pour centrer */
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;  /* flèche sous la bulle */
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.paragrapheInfo{
    margin-top:10px; 
    text-align: justify; 
    font-family: 'Roboto', sans-serif;
    line-height: 1.5em;
}
@media (max-width:480px) {
      .option {
        width:100%;
        margin:10px 0;
      }
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 1.5em;
    }

    .columns-toggle label {
        white-space: normal;  /* autorise le retour à la ligne dans le label */
        min-width: 45%;       /* pour donner une taille confortable */
    }
    .columns-toggle {
        gap: 6px;
    }

    /* Si tu veux que la colonne toggle occupe toute la largeur (optionnel) */
    .columns-toggle.fullwidth {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 25px;
        max-width: 900px;
    }

    h1 {
        font-size: 1.5em;
    }

}